<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./lib/jquery.min.js"></script>
</head>

<body>
    <button id="btnPost"> 使用post向服务器提交数据</button>
    <script>
        $(function () {
            $('#btnPost').on('click',function() {
                $.post('http://www.liulongbin.top:3006/api/addbook',{bookname:'人间',author:'林清玄',publisher:'清华'},
                function(res) {
                    console.log(res);
                    
                })
            })
        })
    </script>

</body>

</html>